package generics;

public class GenericTest {
    static <F> void printTest(F input) {
        F f = input;
        System.out.println(f);
    }

    public static void main(String[] args) {
        Integer i = 1;
        Double j = 1.0;
        String k = "hello";
        printTest(i);
        printTest(j);
        printTest(k);
        System.out.println(new GenericClass("str").getT());
        System.out.println(new GenericClass(1234).getT());
    }
}

class GenericClass<T> {
    private T t;

    public GenericClass(T t) {
        this.t = t;
    }


    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }
}
